package webEquipeRechercheGwt.client.entityMirror;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;


@SuppressWarnings("serial")
public class TeamMirror implements Serializable {

	private int id;
	private String name;
	private String meaning;
	private String status;
	private String urlPage;
	private Collection<PersonMirror> members;
	
	public TeamMirror() {
		super();
		members = new ArrayList<PersonMirror>();
	}
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getMeaning() {
		return meaning;
	}
	public void setMeaning(String meaning) {
		this.meaning = meaning;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getUrlPage() {
		return urlPage;
	}
	public void setUrlPage(String urlPage) {
		this.urlPage = urlPage;
	}
	public Collection<PersonMirror> getMembers() {
		return members;
	}
	public void setMembers(Collection<PersonMirror> members) {
		this.members = members;
	}
	
	public boolean equals(TeamMirror p){
		return p.getId()==getId();
	}
	
	@Override
	public boolean equals(Object p){
		try{
			TeamMirror param = (TeamMirror) p;
			return param.getId()==getId();
		}
		catch(ClassCastException e){
			return false;
		}
	}
	
}
